package velox.jcr.mapper;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractPersistentCollection implements PersistentCollection {
	private List<Entry> changeLog = new ArrayList<Entry>();

	protected void registerRemove(Object entity) {
		changeLog.add(new Entry(entity, Entry.Operation.REMOVE));
	}
	
	protected void registerAdd(Object entity) {
		changeLog.add(new Entry(entity, Entry.Operation.ADD));
	}
	
	public List<Entry> getChangeLog() {
		return changeLog;
	}

	public abstract boolean isLoaded();
}
